<admintpl file="header" />
</head>

<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Stand/ad_index')}">广告列表</a></li>
		</ul>
		<form class="well form-search pd0" method="post"  id="form1">
			<table class="table table-condensed">
				<tbody>
					<tr>
						<td>广告名称</td>
						<td>
							<input type="text" class="wd200" name="a.link_name" value="{$formget.a_link_name}" />
						</td>
						
						<td>
							广告类型：
						</td>
						<td>
							<select class="select2-default" name="a.type_id">
								<option value="" >全部</option>
								<foreach name="adTypes" item="vo" key="key">
									<option value="{$key}" <if condition="$formget[a_type_id] eq $key">selected</if> >{$vo}</option>									
								</foreach>
							</select>
						</td>
						<td>状态:</td>
						<td>
							<select class="select2-default" name="a_status">
								<option value="">全部</option>
								<option value="1" <if condition="$formget['a_status'] eq 1">selected</if> >待审批</option>
								<option value="2"  <if condition="$formget['a_status'] eq 2">selected</if> >审批通过</option>
								<option value="3" <if condition="$formget['a_status'] eq 3">selected</if> >有效</option>
								<option value="4" <if condition="$formget['a_status'] eq 4">selected</if> >无效</option>
							</select>
						</td>
						
						<td>
						</td>
						<td>
							<input type="submit" class="btn btn-primary" onclick="javascript:form1.action='{:U("Stand/ad_index")}';" value="搜索" />
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">ID</th>
						<th>用户互动号</th>
						<th>联系人</th>
						<th>联系电话</th>
						<th>点击率</th>
						<th>状态</th>
						<th>到期时间</th>
						<th>广告名称</th>
						<th>展位id</th>
						<th>是否轮播</th>
						<th>总消费</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<?php
						$is_roll=array('1'=>'否','2'=>'是');
						$status=array('1'=>'待审批','2'=>'审批通过','3'=>'有效','4'=>'无效');
					?>
					<foreach name="list" item="vo">
						<tr>
							<td>{$vo.id}</td>
							<td>{$vo.user_uniq_id}</td>
							<td>{$vo.contact}</td>
							<td>{$vo.mobile}</td>
							<td>{$vo.click_count}</td>
							<td>{$vo.status}</td>
							<td>{$vo.expire_date}</td>
							<td>{$vo.link_name}</td>
							<td>{$vo.stand_id}</td>
							<td>{$is_roll[$vo['is_roll']]}</td>
							<td>{$vo.spend}</td>
							<td>{$vo.create_time}</td>
							<td>
								<if condition="$vo['status'] eq 1">
									<a class="js-ajax-prompt-btn" data-msg="广告审批" href="/Admin/Stand/audit/id/{$vo['id']}">审核</a> |
								</if>
								
								<a href="{:U('Stand/ad_detail',array('id'=>$vo['id']))}">详情</a> |
								<a href="{:U('Stand/ad_delete',array('id'=>$vo['id']))}" msg-dat="确定删除吗？" class="js-ajax-delete">删除</a>
							</td>
						</tr>
					</foreach>
				</tbody>
				<tfoot>
					<tr>
						<th width="50">ID</th>
						<th>用户互动号</th>
						<th>联系人</th>
						<th>联系电话</th>
						<th>点击率</th>
						<th>状态</th>
						<th>到期时间</th>
						<th>广告名称</th>
						<th>展位id</th>
						<th>是否轮播</th>
						<th>总消费</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</tfoot>
			</table>
			<div class="pagination">{$Page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>

</html>